<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>登录页面</title>
<meta
	content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"
	name="viewport">
<!--导入外部的静态资源   th:  @{} 项目路径 alt+enter键 -->
<link rel="stylesheet"
	th:href="@{/static/plugins/bootstrap/css/bootstrap.min.css}">
<link rel="stylesheet"
	th:href="@{/static/plugins/font-awesome/css/font-awesome.min.css}">
<link rel="stylesheet"
	  th:href="@{/static/plugins/ionicons/css/ionicons.min.css}">
<link rel="stylesheet"
	  th:href="@{/static/plugins/adminLTE/css/AdminLTE.css}">
<link rel="stylesheet"
	  th:href="@{/static/plugins/iCheck/square/blue.css}">
    <script
            th:src="@{/static/plugins/jQuery/jquery-2.2.3.min.js}"></script>
    <script
            th:src="@{/static/plugins/bootstrap/js/bootstrap.min.js}"></script>
    <script
			th:src="@{/static/plugins/iCheck/icheck.min.js}"></script>
    <script>
        $(function() {
            $('input').iCheck({
                checkboxClass : 'icheckbox_square-blue',
                radioClass : 'iradio_square-blue',
                increaseArea : '20%' // optional
            });

            // 获取error的值,如果为1,弹出提示框
           var error= $("#error").val();
           if (error=="1"){
           	alert("用户名或密码错误");
		   }

        });
    </script>
</head>

<body class="hold-transition login-page">
	<div class="login-box">
		<div class="login-logo">
			<a href="all-admin-index.html"><b></b>后台管理系统</a>
		</div>
		<!-- /.login-logo -->
		<div class="login-box-body">
			<p class="login-box-msg">登录系统</p>
<!--       <form action="/user/login" method="post">  控制层
     @{}==http://localhost:8080/项目名   -->
			<form th:action="@{/user/login}" method="post">
<!--				从控制层的model域中取  表单组件从域对象中取数据 th:value   -->
				<input id="error" type="hidden"  th:value="${error}"/>
				<div class="form-group has-feedback">
					<input type="text" name="username" class="form-control"
						placeholder="用户名" required> <span
						class="glyphicon glyphicon-envelope form-control-feedback"></span>
				</div>
				<div class="form-group has-feedback">
					<input type="password" name="password" class="form-control"
						placeholder="密码" required> <span
						class="glyphicon glyphicon-lock form-control-feedback"></span>
				</div>
				<div class="row">
					<div class="col-xs-8">
						<div class="checkbox icheck">
							<label><input type="checkbox" name="auto" value="auto"> 记住 下次自动登录</label>
						</div>
					</div>
					<!-- /.col -->
					<div class="col-xs-4">
						<button type="submit" class="btn btn-primary btn-block btn-flat">登录</button>
					</div>
					<!-- /.col -->
				</div>
			</form>

			<a href="#">忘记密码</a><br>
		</div>
		<!-- /.login-box-body -->
	</div>
</body>

</html>